﻿using Learun.Util;
using Learun.Util.SqlSugar;
using System;

namespace Learun.Application.TwoDevelopment.ZZDT_EC
{
    /// <summary>
    /// 版 本 PIT-ADMS V7.0.3 敏捷开发框架
    /// Copyright (c) 2013-2018 Hexagon PPM
    /// 创 建：超级管理员
    /// 日 期：2022-06-20 10:33
    /// 描 述：工程数据属性历史表
    /// </summary>
    public class ec_enginedata_propertyhisService
    {
        #region 仓储
        Repository<ec_projectEntity> _projectRepository => new Repository<ec_projectEntity>();
        Repository<ec_enginedata_propertyhisEntity> _enginedataPropertyhisRepository => new Repository<ec_enginedata_propertyhisEntity>();
        #endregion
        #region 获取数据
        /// <summary>
        /// 获取实体数据
        /// <param name="keyValue">主键</param>
        /// <summary>
        /// <returns></returns>
        public ec_enginedata_propertyhisEntity GetEntity(string keyValue)
        {
            try
            {
                return _enginedataPropertyhisRepository.GetById(keyValue);
            }
            catch (Exception ex)
            {
                if (ex is ExceptionEx)
                {
                    throw;
                }
                else
                {
                    throw ExceptionEx.ThrowServiceException(ex);
                }
            }
        }

        #endregion

    }
}
